
; qemu-system-i386 example_1.bin 直接启动

org 0x7c00
[bits 16]
xor ax, ax
mov ds, ax
mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax
mov sp, 0x7c00
mov ax, 0xb800
mov gs, ax
mov ah, 0x1E
mov al, '2'
mov [gs:2 * (12 * 80 + 12)], ax
mov ah, 0x2C
mov al, '2'
mov [gs:2 * (12 * 80 + 13)], ax
mov ah, 0x3E
mov al, '3'
mov [gs:2 * (12 * 80 + 14)], ax
mov ah, 0x4C
mov al, '2'
mov [gs:2 * (12 * 80 + 15)], ax
mov ah, 0x5E
mov al, '0'
mov [gs:2 * (12 * 80 + 16)], ax
mov ah, 0x6C
mov al, '1'
mov [gs:2 * (12 * 80 + 17)], ax
mov ah, 0x7E
mov al, '3'
mov [gs:2 * (12 * 80 + 18)], ax
mov ah, 0x8C
mov al, '1'
mov [gs:2 * (12 * 80 + 19)], ax
jmp $
times 510 - ($ - $$) db 0
db 0x55, 0xaa